Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Functional Tests] Add timeout for comboBox list loading #73498

Merged
merged 1 commit into from
Jul 30, 2020

Conversation

mbondyra
Copy link
Contributor

@mbondyra mbondyra commented Jul 28, 2020

Summary

Fixes #22233

The test that fails follows these steps:

  1. clear comboBox content
  2. Set comboBox content to 'osx' by these steps
    2.1. Open comboBox
    2.2. Type 'osx' to filter it out
    2.3. Choose the first filtered option

Between steps 2.2 and 2.3, the comboBox flickers and shows all the options. Instead of the right one, the first one is chosen - the problem is only reproducible on cloud, probably because it's a faster, stronger environment. Adding a timeout solves the issue.

The problem with this functional test was fixed with a complete refactoring of comboBox test service for version 7+ so we only need to fix it for 6.8.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@mbondyra mbondyra added v6.8.12 backport:skip This commit does not require backporting failed-test A test failure on a tracked branch, potentially flaky-test Feature:Vis Editor Visualization editor issues release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Jul 28, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-test-triage (failed-test)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@mbondyra mbondyra requested a review from a team July 28, 2020 16:18
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@@ -55,6 +56,7 @@ export function ComboBoxProvider({ getService }) {

async _waitForOptionsListLoading(comboBoxElement) {
await comboBoxElement.waitForDeletedByClassName('euiLoadingSpinner');
await PageObjects.common.sleep(1000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any element we could wait for once this is done loading, so we wouldn't need to wait with an arbitrary amount of time here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately not, the problem here is that right before rendering filtered list, there's a flicker of unfiltered list with the same structure. We could try to refactor a comboBox or think about refactoring the whole test service, but as it's just 6.8, I feel like it's not worth the effort, especially because the solution above works well.

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, didn't test, but as discussed, the reported conversion of a 100% failure to a 100% success rate while testing against a cloud instance is convincing.

@mbondyra mbondyra merged commit 6ae11fc into elastic:6.8 Jul 30, 2020
@mbondyra mbondyra deleted the issue22233 branch July 30, 2020 14:59
@mbondyra mbondyra restored the issue22233 branch July 31, 2020 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting failed-test A test failure on a tracked branch, potentially flaky-test Feature:Vis Editor Visualization editor issues release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v6.8.12
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants